<include file="public:header" />
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">
                <!-- sidebar: style can be found in sidebar.less -->
                <include file="Public:sidebar" />
                <!-- /.sidebar -->
            </aside>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">                
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        分类管理
                        <small><a href="{:U('index')}">文章列表</a></small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                        <li class="active">分类管理</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="box">
                                <div class="box-header">
                                    <h3 class="box-title">内容类型</h3>
                                </div><!-- /.box-header -->
                                <div class="box-body">
                                    <table class="table table-bordered">
                                        <tbody><tr>
                                            <th style="width: 10px">ID</th>
                                            <th>名称</th>
                                            <th>别名</th>
                                            <th style="width: 100px">操作</th>
                                        </tr>
                                        <foreach name="categorys" item="category" key="key" >
                                        <tr>
                                            <td>{$category.id}</td>
                                            <td>{$category.category_name}</td>
                                            <td>{$category.category_slug}</td>
                                            <td>
                                                <a class="btn btn-sm btn-primary" href="{:U('edit',array('id'=>$category['id']))}">编辑</a>
                                                <form action="{:U('delete',array('id'=>$category['id']))}" method="post">
                                                   <input type="submit" class="btn btn-sm btn-danger" value="删除">
                                                </form>
                                            </td>
                                        </tr>
                                        </foreach>
                                    </tbody></table>
                                </div><!-- /.box-body -->
                            </div><!-- /.box -->

                        </div><!-- /.col -->
                        <div class="col-md-6">
                            <div class="box">
                                <div class="box-header">
                                    <h3 class="box-title">添加类型</h3>
                                </div><!-- /.box-header -->
                                <form role="form" action="{:U('edit',array('id'=>$category['id']))}" method="post">
                                    <div class="box-body">
                                        <div class="form-group">
                                            <label for="exampleInputEmail1">名称</label>
                                            <input type="text" name="category_name" value="{$cate.category_name}" class="form-control" id="exampleInputEmail1" placeholder="类型名称">
                                        </div>
                                        <div class="form-group">
                                            <label for="exampleInputPassword1">别名</label>
                                            <input type="text" name="category_slug" value="{$cate.category_slug}" class="form-control" id="exampleInputPassword1" placeholder="类型的英文名">
                                        </div>
                                    </div><!-- /.box-body -->
                                    <div class="box-footer clearfix">
                                        <input type="submit" class="btn btn-primary" value="提交">
                                    </div>
                                </form>
                            </div><!-- /.box -->
                        </div><!-- /.col -->
                    </div>
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->

<include file="Public:footer" />